
/*
 * GET users listing.
 */
var userModel = require('../model/userModel');

exports.list = function(req, res){
  	res.send("respond with a resource");
};

//增加用户
// router.get('/adduser', function(req, res, next){
// 	userModel.add(req, res, next);
// })
exports.adduser = function(req,res){
	userModel.add(req, res);
}

//用户注册
 exports.reg = function(req, res){
	userModel.add(req, res, function(err,result){
		if ( result.code == 200 ) {
			setTimeout(function(){
				res.redirect('/');
			},2500);
			return ;
		}else{
			setTimeout(function(){
				res.redirect('/');
			},2500);
			return ;
		}


	});
 }

// 用户登录

exports.login = function(req, res){
	
}
